import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';

import {Observable} from "rxjs/Observable";
import "rxjs/add/observable/of";

import {Condition, ExportClient, FilterResponse} from '../../../model/pages/client/client-filter/client-filter.model';

@Injectable()
export class ClientFilterProvider {
    private url = '/party/v1/filterClient';
  constructor(public http: HttpClient) {

  }

    // 筛选请求
    public getClientFilter(condition:Condition):Observable<FilterResponse>{
        return this.http.post(this.url,condition) as Observable<FilterResponse>;
    }

    // 加载提示
    getBirthdayList(type: number, notLoading: number = 0): Observable<any> {
        const p = `birthClient`;
        const url = `/${''}/${p}?type=${type}&not-loading=${notLoading}`;
        return this.http.get(url);
    }

}
